﻿<UserControl x:Class="TestCaseManagerApp.Views.ReportingView"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:local="clr-namespace:TestCaseManagerApp.Views"
             xmlns:convert="clr-namespace:TestCaseManagerCore.BusinessLogic.Converters;assembly=TestCaseManagerCore"
             xmlns:chart="clr-namespace:De.TorstenMandelkow.MetroChart;assembly=De.TorstenMandelkow.MetroChart"
             mc:Ignorable="d" Loaded="UserControl_Loaded">
    <Grid>
        <ProgressBar Name="progressBar" Minimum="0" Maximum="1" Height="16" IsIndeterminate="True" Margin="0,0,0,16" Visibility="Visible" />
        <Grid Name="mainGrid" Visibility="Hidden">
            <Grid.Resources>
                <Style x:Key="MinimalChartStyle" TargetType="chart:ChartBase">
                    <Setter Property="Width" Value="500"/>
                    <Setter Property="Height" Value="500"/>
                </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <StackPanel Orientation="Vertical">
                <TextBlock Text="Preview Test Case" Margin="10,0,10,30" Height="Auto" Width="Auto" FontSize="26" FontWeight="Bold" HorizontalAlignment="Left" Grid.Row="0"/>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <chart:PieChart
        Style="{StaticResource MinimalChartStyle}"
        ChartTitle="Test Cases Count"
        ChartSubTitle="Automation status"
        SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}" >
                        <chart:PieChart.Series>
                            <chart:ChartSeries
                SeriesTitle="Errors"
                DisplayMember="Category"
                ValueMember="Number"
                ItemsSource="{Binding Path=TestCasesCounts}" />
                        </chart:PieChart.Series>
                    </chart:PieChart>

                </Grid>
                <Grid Name="gAssociatedAutomationInfo" Margin="0,30,0,30">

                </Grid>
            </StackPanel>

        </Grid>
    </Grid>
</UserControl>